 'use strict';
 var app = angular.module('chatApp', []);


    app.config(function( $routeProvider, $locationProvider ){
        $routeProvider.when('/rooms',{templateURL: 'index.html', controller: 'statCtrl'}).
        			   when('/channel/:id',{templateURL:'partials/room.html',controller: 'roomController'}).
        			   when('/asdf',{templateURL: 'partials/login.html', controller: 'loginController'}).
        			   when('/',{templateURL: 'partials/login.html', controller: 'loginController'}).
        otherwise({redirectTo:'/asdf'});
       // $locationProvider.html5Mode(true);
    });
  /*  app.run(function($rootScope,$location){
    	$rootScope.$on( "$routeChangeStart", function(event, next, current) {
        	$location.path( "/login" );


    });
    	
    	    });*/
